package au.com.evoCoach.domain;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;

import au.com.evoCoach.enums.LtiStatus;

@Entity
public class LtiTeamPlayer {
	private int id;
	private TeamPlayer player;
	private TeamPlayer elevatedRookiePlayer;
	private Round round;
	private LtiStatus ltiStatus;
	
	@Id
	@GeneratedValue
	@Column
	public int getId() {
		return id;
	}
	
	public void setId(int id) {
		this.id = id;
	}
	
	private LtiTeamPlayer() {}
	
	@OneToOne
    @JoinColumn(name="playerId")
	public TeamPlayer getPlayer() {
		return player;
	}
	
	public void setPlayer(TeamPlayer player) {
		this.player = player;
	}
	
	@OneToOne
    @JoinColumn(name="elevatedRookiePlayerId")
	public TeamPlayer getElevatedRookiePlayer() {
		return elevatedRookiePlayer;
	}

	public void setElevatedRookiePlayer(TeamPlayer elevatedRookiePlayer) {
		this.elevatedRookiePlayer = elevatedRookiePlayer;
	}

	@OneToOne
    @JoinColumn(name="ltiRound")
	public Round getRound() {
        return round;
    }

    public void setRound(Round round) {
        this.round = round;
    }
    
    @Enumerated(EnumType.STRING)
    public LtiStatus getLtiStatus() {
        return ltiStatus;
    }

    public void setLtiStatus(LtiStatus ltiStatus) {
        this.ltiStatus = ltiStatus;
    }
	
}
